<template>
  <div class="payment-success">
    <div class="success-container">
      <div class="success-icon">
        <el-icon class="el-icon-success"><Check /></el-icon>
      </div>
      <h1 class="success-title">支付成功</h1>
      <p class="success-desc">感谢您的支付，您可以：</p>
      <div class="action-buttons">
        <el-button type="primary" @click="goToOrders">查看订单</el-button>
        <el-button @click="goToHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { Check } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const goToOrders = () => {
  router.push('/orders')
}

const goToHome = () => {
  router.push('/')
}
</script>

<style scoped>
.payment-success {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  background-color: #f5f7fa;
}

.success-container {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.success-icon {
  font-size: 72px;
  color: #67c23a;
  margin-bottom: 20px;
}

.success-title {
  font-size: 24px;
  color: #303133;
  margin-bottom: 16px;
}

.success-desc {
  font-size: 16px;
  color: #606266;
  margin-bottom: 32px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}
</style>